package com.campus.delivery.bean.earnings;

import com.campus.common.bean.common.PageQueryParam;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.time.LocalDate;

/**
 * 配送员收益查询参数
 */
@Data
@ApiModel("配送员收益查询参数")
public class EarningsQueryParam extends PageQueryParam {
    @ApiModelProperty(value = "配送员ID", required = true)
    @NotNull(message = "配送员ID不能为空")
    private Integer deliveryId;

    @ApiModelProperty(value = "开始日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate startDate;

    @ApiModelProperty(value = "结束日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate endDate;
}